<template>
    <div class="contentDiv">
        <Spin size="large" fix v-if="Loading"></Spin>
        <Form :label-width="180" :disabled="true">
            <Row>
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        家庭基本信息
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="户主姓名:">
                        <Input v-model="ss22002Dto.dczb0002"/>
                    </Form-item>
                </i-col>
                <i-col span="12">
                    <Form-item label="救助人口数:">
                        <Input v-model="ss22001Dto.dcza0004"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="户籍地址:">
                        <Input v-model="ss22001Dto.dcza0006"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="居住地址:">
                        <Input v-model="ss22001Dto.dcza0005"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="低保边缘家庭界定标准:">
                        <Input v-model="ss22001Dto.dcza0009" style="width: 220px"/>
                        元/年（月） 至
                        <Input v-model="ss22001Dto.dcza0010" style="width: 220px"/>
                        元/年（月）
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="家庭年人均收入:">
                        <Input v-model="ss22001Dto.dcza0013"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="证件编号:">
                        <Input v-model="ss22001Dto.dcza0001"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        户主信息
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="户主姓名:">
                        <Input v-model="ss22002Dto.dczb0002"/>
                    </Form-item>
                </i-col>
                <i-col span="12">
                    <Form-item label="户主性别:">
                        <Input v-model="ss22002Dto.dczb0003"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="出生年月:">
                        <Input v-model="ss22002Dto.dczb0004Date"/>
                    </Form-item>
                </i-col>
                <i-col span="12">
                    <Form-item label="民族:">
                        <Input v-model="ss22002Dto.dczb0005"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="身份证号码:">
                        <Input v-model="ss22002Dto.dczb0001"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        其他家庭成员
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <vxe-table border
                               auto-resize
                               row-id="id"
                               :row-key="true"
                               show-overflow="tooltip"
                               highlight-hover-row
                               align="center"
                               header-align="center"
                               ref="xTree"
                               :data="ss22002DtoList">
                        <vxe-table-column field="dczb0002" title="姓名" align="center"/>
                        <vxe-table-column field="dczb0006" title="与申请人关系" align="center"/>
                        <vxe-table-column field="dczb0001" title="身份证号码" align="center"/>
                    </vxe-table>
                </i-col>
            </Row>
            <Row style="margin-top: 15px">
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        打印记录
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="打印状态:">
                        <Input v-model="ss22002Dto.dczb0101Name"/>
                    </Form-item>
                </i-col>
                <i-col span="12">
                    <Form-item label="打印时间:">
                        <Input v-model="ss22002Dto.dczb0102Date"/>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="12">
                    <Form-item label="打印人:">
                        <Input v-model="ss22002Dto.dczb0103"/>
                    </Form-item>
                </i-col>
            </Row>
        </Form>
        <Row>
            <i-col span="24" class="title">
                <Button type="primary" @click="print" :disabled="!canPrint">打印</Button>
            </i-col>
        </Row>
    </div>
</template>

<script>
    import {postAction} from '@/api/request'
    import ICol from "view-design/src/components/grid/col";
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import {LodopMixin} from '../lodop'

    export default {
        mixins: [CommonMixin, LodopMixin],
        components: {ICol},
        props: ['ss22001Dto', 'ss22002Dto', 'lodopLowFamilyInformation', 'ss22002DtoList', 'dcza0011'],
        data() {
            return {
                modal1: false,
                visible: false,
                disableSubmit: false,
                title: "",
                model: {},
                canPrint: false,
            }
        },
        methods: {
            print() {
                var param = new Object();
                param.lodopLowFamilyInformation = this.lodopLowFamilyInformation;
                param.dbzp0001 = this.dcza0011;
                param.dbzp0002 = "PTN_2";
                this.commonPrint(param, 6, null, this.ss22002Dto.dczb0100);
            }
        },
        mounted() {
            if (this.ss22001Dto && this.ss22002Dto) {
                if (this.ss22002Dto.dczb0004) {
                    this.$set(this.ss22002Dto, "dczb0004Date", this.DateFormat(this.ss22002Dto.dczb0004, 'YYYY-MM'));
                }
                if (this.ss22002Dto.dczb0101 == '0') {
                    this.$set(this.ss22002Dto, "dczb0101Name", "未打印");
                    this.canPrint = true;
                } else {
                    this.$set(this.ss22002Dto, "dczb0101Name", "已打印");
                }
                if (this.ss22002Dto.dczb0102) {
                    this.$set(this.ss22002Dto, "dczb0102Date", this.DateFormat(this.ss22002Dto.dczb0102, 'YYYY-MM-DD'));
                }
            }

        }
    }
</script>

<style scoped>
    /deep/ .title {
        height: 50px;
        text-align: center;
        line-height: 50px;
    }
</style>